package cn.sc.summer.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 枚举类型：状态枚举类
 *
 * @author a-xin
 * @date 10:38
 */
@Getter
@AllArgsConstructor
public enum StatusEnum {

    ENABLE_OR_NOT_DELETED(1, "启用/未删除"),
    UN_ENABLE_OR_DELETED(0, "停用/已删除");

    private final Integer type;
    private final String info;

    public static StatusEnum getByType(Integer type) {
        if (null == type) {
            return null;
        }
        for (StatusEnum enums : StatusEnum.values()) {
            if (enums.type.equals(type)) {
                return enums;
            }
        }
        return null;
    }

}
